Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add user lang cookie preference #265

Merged
merged 2 commits into from
May 23, 2024
Merged

Conversation

dcoa
Copy link
Contributor

@dcoa dcoa commented May 7, 2024

This PR has the intention to allow users to change the website language preference based on their cockies.

This PR is inspired by eduNEXT/eox-nelp#127 and allows the normal behavior of the header and footer lang selectors for Django templates.

https://edunext.atlassian.net/browse/DS-936

@dcoa dcoa force-pushed the dcoa/user-lang-pref-cookie branch from 8c01f53 to ab40b63 Compare May 21, 2024 05:29
Copy link
Contributor

@MaferMazu MaferMazu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. It's working as expected. Before this change, I tried to manually change the openedx-lang cookies, but the platform didn't take them into account; with this change, the platform takes into account the preferences I set in the cookies.
Thanks @dcoa 🙌

image
For future reference, I will let the initial problem here: https://github.com/openedx/edx-platform/blob/open-release/palm.master/openedx/core/djangoapps/lang_pref/middleware.py#L61-L62.

Copy link
Contributor

@bra-i-am bra-i-am left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working as expected!

Before:
image

After:
image

@dcoa dcoa merged commit 5dec49b into master May 23, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants